<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/6/25
 * Time: 9:32
 */

$init = curl_init("www.baidu.com");
curl_setopt($init,CURLOPT_RETURNTRANSFER,true);
$result = curl_exec($init);
if(!$result){
	$error = curl_error($init);
	var_dump($error);
	$errno = curl_errno($init);
	var_dump($errno);
}
curl_close($init);
var_dump($result);